import Vue from 'vue'
import Router from 'vue-router'
//登录
import Login from '@/views/Login/Login'
// 首页
import Index from '@/views/Index/Index'
Vue.use(Router)

export default new Router({
  // 解决 vue路由跳转时，总是跳转到下一个页面的底部
  /* mode: 'history',
  scrollBehavior (to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    } else {
      return { x: 0, y: 0 }
    }
  }, */
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index,
      meta: {
        title:"首页"
      }
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
      meta: {
        title:"登录"
      }
    }
  ]
})
